﻿@using Windvoice.Albums
@{
    ViewBag.Title = "Albums";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="body-left">
    <div class="album-list">
        @foreach (var album in (Album[])ViewBag.Albums)
        {
            var FacePhoto = album.GetFacePhoto();
            <div class="album-block">
                <div class="album-preface">
                    <a href="/album/@album.ID"><img src="@(FacePhoto==null?"/Content/images/no-photo.png":FacePhoto.SmallPath)" /></a>
                </div>
                <div class="album-information">
                    <h4><a href="/album/@album.ID">@album.AlbumName</a></h4>
                    <span>@album.GetPhotoCount() photoes, created on @album.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") </span>
                    <span class="album-description">@album.Description</span>
                </div>
            </div>
        }
    </div>
</div>


@Html.Partial("_PartialRight")
<div class="clear"></div>